/* 基础样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  width: 360px;
  min-height: 400px;
  max-height: 500px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  color: #333;
  background: #fff;
}

.container {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 16px;
}

/* 头部样式 */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}

.header h1 {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
}

.count {
  font-size: 13px;
  color: #07c160;
  background: #e7f7ee;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 500;
}

/* 按钮样式 */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: #07c160;
  color: #fff;
}

.btn-primary:hover {
  background: #06ad56;
}

.btn-primary:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.btn-secondary {
  background: #f5f5f5;
  color: #333;
  border: 1px solid #e0e0e0;
}

.btn-secondary:hover {
  background: #eee;
}

.btn-secondary:disabled {
  color: #999;
  cursor: not-allowed;
}

.btn-icon {
  font-size: 16px;
}

.btn-text {
  background: none;
  border: none;
  color: #999;
  font-size: 12px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.btn-text:hover {
  color: #ff4d4f;
  background: #fff1f0;
}

/* 提示信息 */
.tip {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  display: none;
}

.tip.show {
  display: block;
}

.tip.success {
  background: #e7f7ee;
  color: #07c160;
}

.tip.error {
  background: #fff1f0;
  color: #ff4d4f;
}

.tip.warning {
  background: #fffbe6;
  color: #d48806;
}

/* 列表容器 */
.list-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-top: 16px;
  min-height: 0;
  overflow: hidden;
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13px;
  color: #666;
}

.list {
  flex: 1;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #eee;
  border-radius: 8px;
  background: #fafafa;
}

/* 空状态 */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: #999;
}

.empty-state p {
  margin: 4px 0;
}

.empty-hint {
  font-size: 12px;
  color: #bbb;
}

.empty-state.hidden {
  display: none;
}

/* 文章项 */
.article-item {
  display: flex;
  align-items: flex-start;
  padding: 12px;
  border-bottom: 1px solid #eee;
  background: #fff;
  transition: background 0.2s ease;
}

.article-item:last-child {
  border-bottom: none;
}

.article-item:hover {
  background: #f9f9f9;
}

.article-info {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.article-title {
  font-size: 13px;
  font-weight: 500;
  color: #333;
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-all;
}

.article-title:hover {
  color: #07c160;
}

.article-meta {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: #999;
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 3px;
}

.delete-btn {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: #ccc;
  cursor: pointer;
  border-radius: 4px;
  font-size: 16px;
  transition: all 0.2s ease;
  margin-left: 8px;
}

.delete-btn:hover {
  color: #ff4d4f;
  background: #fff1f0;
}

/* 底部 */
.footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #eee;
}

/* 文件名输入 */
.export-filename {
  margin-bottom: 12px;
}

.export-filename label {
  display: block;
  font-size: 12px;
  color: #666;
  margin-bottom: 6px;
}

.filename-input-wrapper {
  display: flex;
  align-items: center;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.filename-input-wrapper:focus-within {
  border-color: #07c160;
  box-shadow: 0 0 0 2px rgba(7, 193, 96, 0.1);
}

#filenameInput {
  flex: 1;
  border: none;
  padding: 8px 12px;
  font-size: 13px;
  outline: none;
  min-width: 0;
}

#filenameInput::placeholder {
  color: #bbb;
}

.filename-suffix {
  padding: 8px 12px;
  background: #f5f5f5;
  color: #999;
  font-size: 13px;
  border-left: 1px solid #e0e0e0;
}

/* 滚动条样式 */
.list::-webkit-scrollbar {
  width: 6px;
}

.list::-webkit-scrollbar-track {
  background: transparent;
}

.list::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 3px;
}

.list::-webkit-scrollbar-thumb:hover {
  background: #ccc;
}

/* 确认对话框 */
.confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.confirm-dialog {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  width: 280px;
  text-align: center;
}

.confirm-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

.confirm-message {
  font-size: 13px;
  color: #666;
  margin-bottom: 20px;
}

.confirm-buttons {
  display: flex;
  gap: 12px;
}

.confirm-buttons .btn {
  flex: 1;
  padding: 10px;
}

.btn-danger {
  background: #ff4d4f;
  color: #fff;
}

.btn-danger:hover {
  background: #ff7875;
}

